<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@	page import="com.yaodian100.core.common.utils.ServerValue"%>
<c-rt:set var="midContextPath" value='<%=ServerValue.getMidContextPath()%>'/>
<script language="javascript">
	$().ready( function() {
		$("#queryCase").click(function(){
			var chkRequired = new Array("orderIdParam","serviceIdParam");
			var isValid = false;
			for (var i=0;i<chkRequired.length;i++) {
				var id = chkRequired[i];
				if ($.trim($("#"+id).val()) != "") {
					isValid = true;
					break;
				}
			}
			if (!isValid) {
				alert("此功能必须输入以下任一栏位: \r\n订单编号 / 服务单编号  ");	
				return false;			
			}else{	
				$("#queryForm").attr("action","/serviceOrder/trackcase/list.do");
				$("#queryForm").submit();
			}	
		});
	});
</script>
<form name="queryForm" action="<c-rt:url value="/serviceOrder/trackcase/list.do"/>" method="post">
<s:actionerror />
<s:actionmessage />
<s:fielderror />
<br />
<div class="f-link"><a href="add.do">新增案件</a></div>
<br />
<h1>查询退换货案件</h1>
<tr>
	<td>*订单编号：<input type="text" name="orderIdParam" id="orderIdParam" value=""/></td>
	<td>*服务单编号：<input type="text" name="serviceIdParam" id="serviceIdParam" value=""/></td>
	<td><input id="queryCase" type="submit" value="查询"/></td>
</tr>
</form>
<br/><br/>
<c-rt:if test="${empty inboundTrackingCaseList}">
	<table width="100%">
		<tr>
			<td align="center">没有符合条件的资料！</td>
		</tr>
	</table>
	</c-rt:if>
<s:if test="inboundTrackingCaseList.size > 0">
<table class="tb-1" width="100%">
		<thead>
			<tr>
				<th>#</th>
				<th>订单编号</th>
				<th>服务单编号</th>
				<th>追踪案件类型</th>
				<th>建立日期</th>
				<th>仓库已收货?</th>
				<th>收货已验过?</th>
				<th>换货已出货?</th>
				<th>换货已到货?</th>
				<th>已退款完成?</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${inboundTrackingCaseList}" var="inboundTrackingCase" varStatus="rows_index">
		<tr>
				<td>
				<a href="${midContextPath}/serviceOrder/trackcase/view.do?caseId=${inboundTrackingCase.caseId}" />${inboundTrackingCase.caseId}</a>
				</td>
				<td>${inboundTrackingCase.orderId}</td>
				<td>${inboundTrackingCase.serviceOrderId}</td>
				<td>${inboundTrackingCase.caseType}</td>
				<td>${inboundTrackingCase.createDate}</td>
				<td><c-rt:if test="${inboundTrackingCase.isReceivePackage eq 'Y'}">是</c-rt:if>
				<c-rt:if test="${inboundTrackingCase.isReceivePackage eq 'N'}">否</c-rt:if></td>
				<td><c-rt:if test="${inboundTrackingCase.isQc eq 'Y'}">是</c-rt:if>
				<c-rt:if test="${inboundTrackingCase.isQc eq 'N'}">否</c-rt:if></td>
				<td><c-rt:if test="${inboundTrackingCase.isShip eq 'Y'}">是</c-rt:if>
				<c-rt:if test="${inboundTrackingCase.isShip eq 'N'}">否</c-rt:if> </td>
				<td><c-rt:if test="${inboundTrackingCase.isArrival eq 'Y'}">是</c-rt:if>
				<c-rt:if test="${inboundTrackingCase.isArrival eq 'N'}">否</c-rt:if></td>
				<td><c-rt:if test="${inboundTrackingCase.isRefund eq 'Y'}">是</c-rt:if>
				<c-rt:if test="${inboundTrackingCase.isRefund eq 'N'}">否</c-rt:if></td>
		</tr>
		</c:forEach>
		</tbody>
	</table>
</s:if>	